/*
 * Copyright (c) 2025 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <gtest/gtest.h>

#include "base/geometry/ng/image_mesh.h"

std::vector<double> mesh = { 1.0, 1.1, 1.2 };
int column = 1, row = 1;

class HUAWEI_TEST : public testing::Test {
protected:
    Keels::Ace::NG::ImageMesh* _p_a;
    virtual void SetUp() override
    {
        this->_p_a = new Keels::Ace::NG::ImageMesh(mesh, 1, 1);
    }
    virtual void TearDown() override
    {
        delete this->_p_a;
    }
};

// auto invoke Setup() & TearDown() of this fixture
TEST_F(HUAWEI_TEST, geometry_class1)
{
    std::cout << _p_a->GetColumn() << ' ' << _p_a->GetRow() << ' ' << std::endl;
    Keels::Ace::NG::ImageMesh x(mesh, column, row);
    EXPECT_EQ(x, *_p_a);
}

TEST_F(HUAWEI_TEST, geometry_class2)
{
    Keels::Ace::NG::ImageMesh x(mesh, column + 1, row + 1);
    EXPECT_EQ(true, *_p_a != x);
}

TEST_F(HUAWEI_TEST, geometry_class3)
{
    Keels::Ace::NG::ImageMesh x(mesh, column + 1, row + 1);
    *_p_a = x;
    EXPECT_EQ(true, *_p_a == x);
}
